<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>{if isset($SEO['title']) && !empty($SEO['title'])}{$SEO['title']}{/if}{$SEO['site_title']}</title>
<meta name="keywords" content="{$SEO['keyword']}">
<meta name="description" content="{$SEO['description']}">
<link href="{THEME_STYLE_PATH}style/css/default_new.css" type="text/css" rel="stylesheet" />
<script src="{THEME_STYLE_PATH}style/js/jquery.min.js"></script>
<script src="{THEME_STYLE_PATH}style/js/core.js"></script>
<!--script src="http://l.tbcdn.cn/apps/top/x/sdk.js?appkey=21635038"></script--><link href="{THEME_STYLE_PATH}style/css/percenter.css" type="text/css" rel="stylesheet">
<!--[if IE 6]>
<script src="/js/DD_belatedPNG.js"></script>
<script>
  DD_belatedPNG.fix('*');
</script>
<![endif]-->
<!--[if IE 6]>
<style type="text/css">
    html{overflow:hidden;}
    body{height:100%;overflow:auto;}
</style>
<![endif]-->
</head>

<body>
	
	{include template('header','common')}	
	<div id="Mainbox">
	<!--插入侧边栏-->
		{include template('sidebar_login','common')}
		<!--插入侧边栏-->
		{include template('top_advance','common')}
		
		<!-- 左侧 -->
		{include template('member_left','common')}
		<!--右侧-->
		<div class="percenter_right" id="alipayList">
			<div class="aboutper_acc">
				<p class="a1" style="margin-bottom:10px;">绑定财付通<span style="color:#a3a3a3;float:none;">（最低5元提现）</span></p>
				<ul class="cft_list">
					<li class="a1">姓名：</li>
					<li class="a2"><input style="width:80px;" id="tbName"   type="text">&nbsp;&nbsp;<span class="da3" id="tbName_i">请务必填写您的真实姓名！</span><span class="re1" id="tbName_w" style="display:none;">格式输入有误！</span><img id="tbName_s" src="{THEME_STYLE_PATH}style/images/right.png" style="vertical-align:-5px;display:none;"></li>
					<li class="a1">账号：</li>
					<li class="a2"><input id="tbAccount" type="text" >&nbsp;&nbsp;<span class="da3" id="tbAccount_i">请输入QQ号码/手机号码/电子邮箱！</span><span class="re1" id="tbAccount_w" style="display:none;">格式输入有误！</span><img id="tbAccount_s" src="{THEME_STYLE_PATH}style/images/right.png" style="vertical-align:-5px;display:none;"></li>
					<li class="a1">确认账号：</li>
					<li class="a2"><input id="tbCmAccount" type="text">&nbsp;&nbsp;<span class="da3" id="tbCmAccount_i">请再次确认账号！</span><span class="re1" id="tbCmAccount_w" style="display:none;">格式输入有误！</span><img id="tbCmAccount_s" src="{THEME_STYLE_PATH}style/images/right.png" style="vertical-align:-5px;display:none;"></li>
					<li class="a1">验证码：</li>
					<li class="a2"><input style="width:50px;" maxlength="6" id="tbCode" type="text">&nbsp;&nbsp;<span id="phoneArea"><a href="javascript:void(0);" onclick="getCode()" class="b40link">点击获取手机验证码</a></span>&nbsp;&nbsp;<span class="da3" id="tbCode_i"></span><span class="re1" id="tbCode_w" style="display:none;"></span><img id="tbCode_s" src="%E7%BB%91%E5%AE%9A%E6%94%AF%E4%BB%98%E5%AE%9D_%E4%B8%AA%E4%BA%BA%E4%B8%AD%E5%BF%83_files/right.png" style="vertical-align:-5px;display:none;"></li>
					<li class="a1"></li>
					<li class="a2"><a href="javascript:void(0);" class="editbtn">确认绑定</a></li>
				</ul>	
				
				<p class="a1" style="margin-bottom:15px;">已绑定的财付通账号</p>
				<table class="cft_table" border="0" cellpadding="0" cellspacing="1" bgcolor="#dedede" width="654">
				  <tbody><tr>
					<td class="title a1" bgcolor="#ffffff">姓名</td>
					<td class="title a2" bgcolor="#ffffff">账号</td>
					<td class="title a3" bgcolor="#ffffff">操作</td>
				  </tr>
				 {if $alipay}
				{loop $alipay $v}
				  <tr>
					<td bgcolor="#ffffff" class="a1"> {$v[username]}</td>
					<td bgcolor="#ffffff" class="a2"> {$v[account]}</td>
					<td bgcolor="#ffffff" class="a3"><a href="{U('Member/Account/ten_edit',array('id'=>$v[id]))}" class="b40link" action-date="395463">修改</a></td>
				  </tr>
				{/loop}
				{else}
				<tr>
					<td colspan="3" class="a1" bgcolor="#ffffff">暂无绑定信息</td>
				  </tr>
				
				{/if}
				  			  </tbody></table>
			</div>			
		</div>
				<!--右侧-->
		<div class="clear"></div>
	</div>
	<!--主体-->
	<!--尾部-->
			{include template('footer','common')}


	
	

	<!--尾部-->


<script type="text/javascript"><!--
var code,codeError;var code_s=false;var limit = true;
$(document).ready(function() {
	var v = juxiangyou.component.verification;
	$('#tbName').focus(function(){
		var id = this.id;$('#'+id+'_i').css('color','black');    
		switchTip(id,0);
	}).blur(function(){
		var id = this.id;var value = $.trim($(this).val());
		if(value){
			if(v.chkChinese(value)==false){
				$('#'+id+'_w').html('格式输入有误！');switchTip(id,2);
			}else{
				switchTip(id,1);
			}
		}else{
			$('#'+id+'_i').css('color','#a3a3a3');switchTip(id,0);
		}
	});
	$('#tbAccount').focus(function(){
		var id = this.id;$('#'+id+'_i').css('color','black');
		switchTip(id,0);
	}).blur(function(){
		var id = this.id;var value = $.trim($(this).val());var _value = $.trim($('#tbCmAccount').val());
		if(value){
			if(v.chkMail(value)==false && v.chkPhone(value)==false && v.chkInt(value,5,12)==false){
				$('#'+id+'_w').html('格式输入有误！');switchTip(id,2);
			}else{
				if(_value && _value==value){
					switchTip('tbCmAccount',1);
				}else if(_value && _value!=value){
					$('#tbCmAccount_w').html('两次输入的账号不同！');switchTip('tbCmAccount',2);
				}
				switchTip(id,1);
			}
		}else{
			$('#'+id+'_i').css('color','#a3a3a3');switchTip(id,0);
		}
	});	


		$('#tbCmAccount').focus(function(){
			var id = this.id;$('#'+id+'_i').css('color','black');
			switchTip(id,0);
		}).blur(function(){
			var id = this.id;var value = $.trim($(this).val());var _value = $.trim($('#tbAccount').val());
			if(value){
				if(v.chkMail(value)==false && v.chkPhone(value)==false && v.chkInt(value,5,12)==false){
					$('#'+id+'_w').html('格式输入有误！');switchTip(id,2);
				}else if(_value && value!=_value){
					$('#'+id+'_w').html('两次输入的账号不同！');switchTip(id,2);
				}else{
					switchTip(id,1);
				}
			}else{
				$('#'+id+'_i').css('color','#a3a3a3');switchTip(id,0);
			}
		});

	
	$('.editbtn').click(function(){
		
		if(!limit) return;
		var id = "tbCode";var value = $.trim($("#tbCode").val());
		if(value){
			if(v.chkInt(value,6,6)==false){
					$('#'+id+'_w').html('格式输入有误！');code_s = false;switchTip(id,2);return;
			}
		}else{
			$('#'+id+'_i').css('color','#a3a3a3');code_s = false;switchTip(id,0);return;
		}
	
		var name = $.trim($('#tbName').val());var name_s = false;
		if(!name){
			name_s = false;$('#tbName_i').css('color','black');switchTip('tbName',0);
		}else if(v.chkChinese(name)==false){
			name_s = false;switchTip('tbName',2);
		}else{
			name_s = true;switchTip('tbName',1);
		}
		
		var account = $.trim($('#tbAccount').val());var account_s = false;
		if(!account){
			account_s = false;$('#tbAccount_i').css('color','black');switchTip('tbAccount',0);
		}else if(v.chkMail(account)==false && v.chkPhone(account)==false && v.chkInt(account,5,12)==false){
			account_s = false;switchTip('tbAccount',2);
		}else{
			account_s = true;switchTip('tbAccount',1);
		}
		
		var cmAccount = $.trim($('#tbCmAccount').val());var cmAccount_s = false;
		if(!cmAccount){
			cmAccount_s = false;$('#tbCmAccount_i').css('color','black');switchTip('tbCmAccount',0);
		}else if(v.chkMail(cmAccount)==false && v.chkPhone(cmAccount)==false && v.chkInt(cmAccount,5,12)==false){
			cmAccount_s = false;$('#tbCmAccount_w').html('格式输入有误！');switchTip('tbCmAccount',2);
		}else if(cmAccount!=account){
			cmAccount_s = false;$('#tbCmAccount_w').html('两次输入的账号不同！');switchTip('tbCmAccount',2);
		}else{
			cmAccount_s = true;switchTip('tbCmAccount',1);
		}
	
		if(name_s && account_s && cmAccount_s ){
			$.ajax({
				type: "POST",
				url: "{U('Member/Account/binding_ten')}",
				dataType: "json",
				data : {"act":"submit","name":name,"account":account,"code":value},
				success: function(data){
					if(data.flag==1){
						popup.prompt(data.msg);
						location.href= '<?php echo $_GET['__URL__']?>';
					}else{
						$('#'+id+'_w').html(data.msg);switchTip(id,2);limit = true;
					}
				}
			});
		}
	});
});

function getCode()
{
	$.ajax({
		type: "POST",
		url: "{U('Member/Account/tenPay_code')}",
		dataType: "json",
		data : {"act":"getCode"},
		success: function(data){
			if(data.flag ==1){
				ShowSecond(parseInt(60)); 
			}else{
				$('#tbCode_w').html(data.msg);switchTip('tbCode',2);
			}
		}
	});
}
function ShowSecond(cDate)
{
	if(cDate > 1){
		var _html = '<span id="lastTime"><span style="color:red">'+(--cDate)+'</span>秒后可重新发送</span>';
		
		$('#phoneArea').html(_html);
		setTimeout("ShowSecond("+cDate+")",1000);
	}
	else{
		var _html = '<a href="javascript:void(0);" onclick="getCode()" class="b40link">点击获取验证码</a>';
		$('#phoneArea').html(_html);
	} 

}


function switchTip(id,sign)
{
	var iObject = $('#'+id+'_i');
	var wObject = $('#'+id+'_w');
	var sObject = $('#'+id+'_s');
	if(sign==1){iObject.hide();wObject.hide();sObject.show();}
	else if(sign==2){iObject.hide();wObject.show();sObject.hide();}
	else{iObject.show();wObject.hide();sObject.hide();}
}
</script>
<script src="{THEME_STYLE_PATH}style/js/_tts_browser_center.js" data-message="1" data-version="1.4.2" data-browser="firefox" data-source="Firefox" data-guid="00000000124486F782E62C45AA7FA600" data-id="0011000820131018" charset="utf-8" type="text/javascript" id="J---TK-load"></script><div id="TK-log"><img style="display: none;" src="%E7%94%B3%E8%AF%B7%E6%8F%90%E7%8E%B0_%E4%B8%AA%E4%BA%BA%E4%B8%AD%E5%BF%83_files/statistics.txt" height="0" width="0"></div></body></html>" data-message="1" data-version="1.4.2" data-browser="firefox" data-source="Firefox" data-guid="00000000124486F782E62C45AA7FA600" data-id="0011000820131018" charset="utf-8" type="text/javascript" id="J---TK-load"></script><div id="TK-log"><img style="display: none;" src="%E7%BB%91%E5%AE%9A%E6%94%AF%E4%BB%98%E5%AE%9D_%E4%B8%AA%E4%BA%BA%E4%B8%AD%E5%BF%83_files/statistics.txt" height="0" width="0"></div></body></html>